using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Outpatient.Doman.Smart
{
    /// <summary>
    /// 咨询分类实体类
    /// </summary>
    [Table("ConsultationCategory")]
    public class ConsultationCategory
    {
        /// <summary>
        /// 分类唯一标识 - 主键，自增
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int CategoryId { get; set; }

        /// <summary>
        /// 分类名称(如"中医常识"、"疾病预防"等)
        /// </summary>
        [Required]
        [StringLength(100)]
        public string CategoryName { get; set; } = string.Empty;

        /// <summary>
        /// 分类图标URL
        /// </summary>
        [StringLength(255)]
        public string Icon { get; set; } = string.Empty;

        /// <summary>
        /// 分类描述
        /// </summary>
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 是否删除 - 软删除
        /// </summary>
        public bool IsDeleted { get; set; } = false;

        // 导航属性
        public virtual ICollection<Consultation> Consultations { get; set; } = new List<Consultation>();
    }
} 